package Lecture7_7;

import java.util.Scanner;

public class FactorialFunction {

	public static void main(String[] args) 
	{
		Scanner sc = new Scanner (System.in);
		
		System.out.println("N! = ");
		int n = sc.nextInt();
		
		System.out.print(n + "! = ");
		n = doFactorial(n);
		System.out.println(n);
		
	}

	public static int doFactorial (int n)
	{
		int a = 1;
		
		for (int i = 1; i <= n; i++)
		{
			a *= i;
		}

		return a;
	}
	
	
	
	
	
	
	
}



